#include "log.h"

#include <stdio.h>
#include <stdarg.h>
#include <string.h>

#if defined(_WIN32)
	#include <windows.h>
	#define snprintf _snprintf
#elif defined(__APPLE__)

#elif defined(ANDROID)

#include <jni.h>
#include <android/log.h>	

#endif

/*int ufoLog(const char* tag, const char *fmt, ...)
{
	va_list	arglist;
	char buf[2048] = {0};
	char pszfinalbuf[2048] = {0};
	int len = 0;

	va_start(arglist, fmt);
#if defined(_WIN32)
	len = _vsnprintf(buf,sizeof(buf)-1, fmt, arglist);
#else
	len = vsnprintf(buf,sizeof(buf)-1, fmt, arglist);
#endif
	va_end(arglist);
	if (len >= 2048)
		buf[2047] = '\0'; 

	snprintf(pszfinalbuf, sizeof(buf)-1, "%s: %s\n", tag, buf);

#ifdef __APPLE__
	printf("%s\n", pszfinalbuf);
#endif

#if defined(_WIN32)
	OutputDebugStringA(pszfinalbuf);
#endif
	
	return 1;
}*/